﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="copyright" content=""/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <title>名片-编辑</title>
    <link href="<%=path%>/favicon.ico" rel="shortcut icon">
    <link href="https://cdn.jsdelivr.net/gh/bootcdn/BootCDN/ajax/libs/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/public.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/activity.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/marketing.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/style_list.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/custom.css" />

    <link href="<%=path%>/hplus/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="<%=path%>/hplus/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="<%=path%>/hplus/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/animate.min.css" rel="stylesheet">
    <link href="<%=path%>/hplus/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="<%=path%>/hplus/js/plugins/sweetalert/sweetalert2.min.css">
    <style type="text/css">
        .form-control{width:90%;}
        .myActive{
            border:3px solid #1ab394;
        }
        .yewu_table{
            border:3px solid #ddd;
        }

        .yewu_table2{
            text-align: left;
            height: 150px;
        }
        #qrcode img{
            width:100%;
            /* margin:10%; */
            border:5px solid #fff;
        }

        .s_md{
            overflow: hidden;
            text-overflow:ellipsis;
            white-space: nowrap;
        }
    </style>
</head>
<body  class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="container-fluid">         <div class="row">
        <div class="col-md-12">
            <!--步骤-->
            <div hidden="" class="progress" style="width:400px;">
                <div class="progress-bar progress-bar-warning" role="progressbar"
                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
                    <span class="sr-only_1">1</span>
                    <p class="x_color_bz">选择模板</p>
                </div>
                <div class="progress-bar progress-bar-warning" role="progressbar"
                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
                    <span class="sr-only_1">2</span>

                    <p class="x_color_bz x_color_dq" style="color:#ffc105;">编辑内容</p>
                </div>
                <!-- <div class="progress-bar progress-bar-info" role="progressbar"
                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
                    <span class="sr-only_2">3</span>
                    <p class="x_color_bz x_color_dq">分享设置</p>
                </div> -->
                <div class="progress-bar progress-bar-info" role="progressbar"
                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
                    <span class="sr-only_2">3</span>
                    <p class="x_color_bz">名片预览</p>
                </div>
                <div class="progress-bar progress-bar-info" role="progressbar"
                     aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">
                    <span class="sr-only_2">√</span>
                    <p class="x_color_bz">分享</p>
                </div>
            </div>
            <!--步骤end-->
        </div>
        <div class="col-md-12 ">
            <!--内容左侧-->
            <div class="x_basics_list x_basics x_floatl x_w  x_padding10">
                
                <div class="x_basics x_floatl x_l">
                    <div class="calling_card_body s_left_phone">
                        <div class="calling_card fix" id="bm_chtml">
                           
                            <span id="cc_name">zhfeat</span>
                            <dl class="fix">
                                <dt><img id="head_pic" src="<%=path%>/images/marketing/Default_Avatar.png" style="width:100%;"/></dt>
                                <dd>
                                    <h5 id= "cc_nname">酷客</h5>
                                    <em id="cc_job">北京总部 总经理</em>
                                </dd>
                            </dl>
                            <p id="cc_zuoyou">
                                <img src="<%=path%>/images/marketing/icon_plume.png" />
                                学会下一次进步，是做大自己的有效法则。因此千万不要让自己睡在已有的成功温床上
                            </p>
                            <ul class="fix">
                                <li id="cc_phone"><img src="<%=path%>/images/marketing/icon11.png" />  150-0000-0000</li>
                                <li id="cc_zuoji"><img src="<%=path%>/images/marketing/icon22.png" />  010-88888888</li>
                                <li id="cc_mail"><img src="<%=path%>/images/marketing/icon33.png" />  zqkk@126.com</li>
                                <li id="cc_weixin"><img src="<%=path%>/images/marketing/icon55.png" />  zqkk</li>
                                <li id="cc_weibo"><img src="<%=path%>/images/marketing/icon66.png" />  zqkk</li>
                                <li id="cc_qq"><img src="<%=path%>/images/marketing/icon44.png" />  6666666</li>
                            </ul>
                            <em class="k_btn_zzmp" style="display: none;">制作我的名片</em>
                            <div class="k_ewm_box">
                                <div id="qrcode"></div>
                                <i>长按保存通讯录</i>
                            </div>
                            <em class="k_icon_right"><img src="<%=path%>/images/marketing/k_icon_right.png" /></em>
                        </div>
                        <div class="k_phone">
                            <dl class="k_title fix" id="info1">
                                <dt><img id="micro_pic" style="width: 133px;height: 109px"  src="" ></dt>
                                <dd>
                                    <p><font id="micro_name" size="5px"></font></p>
                                    <p id="micro_business"></p>
                                    <p id="micro_intro"></p>
                                    <ol id="micro_tag" class="fix">

                                    </ol>
                                    <span id="micro_score">

                                         </span>
                                    <div id="business_hours" style="overflow:auto;max-height:60px"></div>
                                </dd>
                            </dl>
                            <ol class="k_detailed fix" id="info11">
                                <li id="micro_address"><img src="<%=path%>/images/marketing/icon_address.png" /></li>
                                <li id="micro_phone"><img src="<%=path%>/images/marketing/icon_phone.png" /></li>
                            </ol>
                            <div class="k_cut kkkk" id="info2">
                                <h1><p>业务介绍</p><i></i></h1>
                                <ul class="surrent">
                                    <div class="k_content" style="margin-bottom: -10px;" id="bm_yewushow">
                                    </div>
                                </ul>
                            </div>
                            <div class="k_cut kkkk" id="info3">
                                <h1><p>我推荐</p><i></i></h1>
                                <ul class="surrent" id = "bm_xianshi">
                                    <%-- <div class="k_content" >
                                          <dl class="fix">
                                            <dt><img src="<%=path%>/images/marketing/s_img_bg.png" /></dt>
                                            <dd>
                                                <p>充值1000赠500代金券<i>进行中</i></p>
                                                <span>
                                                    <img src="<%=path%>/images/marketing/star.png" />
                                                    <img src="<%=path%>/images/marketing/star.png" />
                                                    <img src="<%=path%>/images/marketing/star.png" />
                                                    <img src="<%=path%>/images/marketing/star.png" />
                                                    <img src="<%=path%>/images/marketing/star_no.png" />
                                                    9.8分
                                                </span>
                                                <em>有效期至2017-12-30</em>
                                            </dd>
                                        </dl>
                                        <ol class="fix">
                                            <li>菜品卫生</li>
                                            <li>菜量足</li>
                                            <div>
                                                <li class="s_partake">17263人参与</li>
                                                <li class="s_like"><img class="s_dianzan_img" src="<%=path%>/images/marketing/dianzan.png" _id="1" />17263</li>
                                            </div>
                                        </ol>
                                    </div> --%>
                                </ul>
                            </div>
                            <p class="k_footer">zhfeat提供技术服务</p>
                        </div>
                    </div>
                </div>
                <!--活动预览部分end-->
                <div class="x_floatr x_r x_top10 x_padding10" style="margin-top:20px;">
                    <div class="x_editor k_editor form-horizontal">
                        <!-- <form role="form" class="form-horizontal" > -->
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i style="color:red">*&nbsp;</i>选择员工</label>
                            <div class="col-sm-10">
                                <input class="form-control" id="bm_user_id" type="text" placeholder="员工名称（必填）" maxlength="25" onblur="checkLength(this)">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i style="color:red">*&nbsp;</i>企业名称</label>
                            <div class="col-sm-10">
                                <input class="form-control" id="focusedInput" type="text" placeholder="请输入企业名称（必填）" maxlength="25" onblur="checkLength(this)">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label">头像</label>
                            <div class="col-lg-4">
                                <p style="margin-top:8px;"><font color="#E0E0E0">建议图片尺寸100*100</font></p><br>
                                <form  id='upload_pic' enctype='multipart/form-data'>
                                    <ul>
                                        <li>
                                            <div class="x_pt_h" ><%--bj002--%>
                                                <div class="x_img_sc"><img id="card_image"  src="<%=path%>/images/marketing/img_p.png" height="100%" width="100%"></div>
                                                <input type="file" accept="image/gif,image/jpeg,image/x-png" id="x_inputfile"  onchange="uploadPic()" name="filepath" style=" filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity: 0.5; opacity: 0.0; position:absolute; z-index:99;">
                                            </div>
                                        </li>
                                    </ul>
                                </form>
                            </div>
                            <div class="clear-shadow"></div>
                        </div>
                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label"><i style="color:red">*&nbsp;</i>姓名</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_cname" placeholder="请输入姓名（必填）" maxlength="15" onblur="checkLength(this)">
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label"><i style="color:red">*&nbsp;</i>职务</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_cjob" placeholder="请输入职务（必填）" maxlength="10" onblur="checkLength(this)">
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label"><i style="color:red">*&nbsp;</i>手机</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_cmoblie" placeholder="请输入手机号（必填）" style="ime-mode:disabled;" onkeypress="keyPress()" maxlength="11">
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label">座机</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_czuoji" placeholder="请输入座机号（非必填）" maxlength="15" onblur="checkLength(this)">
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label">邮箱</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_cmail" placeholder="请输入邮箱（非必填）" maxlength="30" onblur="checkLength(this)">
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label">微信</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_cweixin" placeholder="请输入微信号（非必填）" maxlength="25" onblur="checkLength(this)">
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label">微博</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_cweibo" placeholder="请输入微博（非必填）" maxlength="30" onblur="checkLength(this)">
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label">QQ</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_cqq" placeholder="请输入qq(非必填)" style="ime-mode:disabled;" onkeypress="keyPress()" maxlength="12">
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label">座右铭</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id = "bm_cziding" placeholder="请输入座右铭（非必填）"maxlength="30" onblur="checkLength(this)">
                                </input>
                            </div>
                            <div class="clear-shadow"></div>
                        </div>

                        <!--企业信息-->
                        <div class="x_list_style">
                            <ul class="x_title">
                                <li class="x_list01" id="bm_men_dian">
                                    <img src="<%=path%>/images/marketing/s_check.png" class="s_check" _id="1" alt="1"/>
                                    <i>企业信息</i>
                                </li>
                                <li class="x_list02 "><h3 style="color: #03a9f4; text-decoration: underline;" id="bm_cmen">选择列表</h3></li>
                            </ul>
                            <div class="clear-shadow"></div>
                            <div class="x_list_center01" >
                                <div class="panel panel-default" style="background-color:#f4f7f9;">
                                    <div class="panel-body">
                                        <ul>
                                            <li>金百万烤鸭（亦庄店）<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="x_list_center02" style="display:block;">
                                <div class="panel panel-default" style="background-color:#f4f7f9;">
                                    <div class="panel-body">
                                        <ul id="bm_md_list">
                                            <%-- <li>金百万烤鸭（亦庄店）<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li> --%>
                                        </ul>
                                    </div>
                                </div>
                                <div class="clear-shadow"></div>
                            </div>
                        </div>
                        <!--企业信息end-->
                        <div class="clear-shadow"></div>
                        <!--业务介绍-->
                        <div class="x_list_style">
                            <ul class="x_title">
                                <li class="x_list01" id="bm_ye_wu_gou">
                                    <img src="<%=path%>/images/marketing/s_check.png" class="s_check" _id="1" alt="2"/>
                                    <i>业务介绍</i>
                                </li>
                                <li class="bm_yewu" id="bm_xuanzeyewu">
                                    <h3 style="color: #03a9f4; text-decoration: underline;">选择列表</h3>
                                </li>
                            </ul>
                            <div class="clear-shadow"></div>
                            <div class="x_list_center01" >
                                <div class="panel panel-default" style="background-color:#f4f7f9;">
                                    <div class="panel-body">
                                        <ul>
                                            <li>好伦哥的业务介绍<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="x_list_center02" style="display:block;">
                                <div class="panel panel-default" style="background-color:#f4f7f9;">
                                    <div class="panel-body">
                                        <ul id="bm_yewuxian">
                                            <%--  <li>金百万烤鸭（亦庄店）<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li>  --%>
                                        </ul>
                                    </div>
                                </div>
                                <div class="clear-shadow"></div>
                            </div>
                        </div>
                        <!--业务介绍end-->
                        <div class="clear-shadow"></div>

                        <!--我推荐-->
                        <div class="x_list_style">
                            <ul class="x_title">
                                <li class="x_list03" id="bm_tui_tui">
                                    <img src="<%=path%>/images/marketing/s_check.png" class="s_check" _id="1" alt="3"/>
                                    <i>我推荐</i>
                                </li>
                                <li class="bm_wotuijian" id="bm_wotuijianid"><h3 style="color: #03a9f4; text-decoration: underline;">选择我推荐</h3></li>
                            </ul>
                            <div class="clear-shadow"></div>
                            <div class="x_list_center03 " >
                                <div class="panel panel-default" style="background-color:#f4f7f9;">
                                    <div class="panel-body">
                                        <ul>
                                            <%-- <li>金百万烤鸭（亦庄店）<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li> --%>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="x_list_center04" style="display:block; ">
                                <div class="panel panel-default" style="background-color:#f4f7f9;">
                                    <div class="panel-body">
                                        <ul id="bm_tuijan">
                                            <%-- <li>金百万烤鸭（亦庄店）<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li>
                                            <li>金百万烤鸭（亦庄店）<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li> --%>
                                        </ul>
                                    </div>
                                </div>

                            </div>
                        </div>
                        <!--我推荐end-->
                        <div class="clear-shadow"></div>
                        <div class="x_top10">
                            <form role="form" >
                                <div class="row">
                                    <div class=" x_floatl ">
                                    </div>
                                    <div class=" x_floatr" style="margin-left:30px;">
                                    </div>
                                    <div class="x_floatr">
                                    	<shiro:hasPermission name="markting_business_card_create:save">
                                        	<a class="x_button_y" href="javascript:void(0)">保存</a>
                                        </shiro:hasPermission>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="clear-shadow"></div>
                        <!-- </form> -->
                    </div>
                </div>
            </div>
            <!--内容左侧end-->
        </div>
    </div>
    </div>
</div>

<!-- 添加账号弹框 -->
<div class="x_popup">
    <div class="issue x_xk_issue">
        <span><img src="<%=path%>/images/marketing/close.png" /></span>
        <h4>扫一扫 立刻分享</h4>
        <p><img src="<%=path%>/images/marketing/code.jpg" /></p>
    </div>
</div>



<!-- 删除活动弹框 -->
<div class="s_popup_delect">
    <div class="issue_delect">
        <span><img id="bm_md_cha" src="<%=path%>/images/marketing/close.png" /></span>
        <h4><img src="<%=path%>/images/marketing/warning.png" /> 删除门店提示</h4>
        <p>确定要删除此门店吗</p>
        <ol class="fix">
            <li><a href="javascript:;" class="s_cancel" id="bm_shan_men">取消</a></li>
            <li><a href="javascript:deleteStore();" id="bm_shan_que">确定</a></li>
        </ol>
    </div>
</div>



<!-- 门店弹窗！！！！！！ -->
<div class="x_popup_add">
    <div class="issue_add">
        <span><img src="<%=path%>/images/marketing/close.png" /></span>
        <h4>选择门店</h4>
        <ul class="s_role_condition fix ">
            <li>关键字<input placeholder="输入关键字，支持模糊搜索" type="text" id="bm_keyword"></li>
            <%--<li>
                <div class=" x_floatr x_button_add" style="left: 65%;position: fixed;">
                    <a class=" x_button " href="javascript:;">添加门店</a>
                </div>
            </li>--%>
            <li><i><img src="<%=path%>/images/marketing/icon_search.png" id="bm_csous"></i></li>
        </ul>
        <div class="k_box3">
            <div class="k_record">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins" style="margin-bottom:0px;">
                            <div class="ibox-content" style="max-height:400px;overflow-y:auto;">
                                <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="4">
                                    <thead>
                                    <tr>
                                        <th data-toggle="true">&nbsp;&nbsp;门店名称</th>
                                        <th>地址</th>
                                        <th data-hide="all">电话</th>
                                    </tr>
                                    </thead>
                                    <tbody id = "bm_cstore">

                                    </tbody>

                                </table>

                                <!--分页  -->
                                <div class="m_xpages" style="width:100%;margin:0;padding:0;">
                                    <div class="mian">
                                        <span>显示行数</span> <select><option>5</option>
                                        <option>10</option>
                                        <option>20</option></select> <span class="bm_tiao">共0条</span> <span class="bm_ye">0/0页</span> <a
                                            href="javascript:;" class="prev">上一页</a> <a href="javascript:;"
                                                                                        class="next">下一页</a> <span>前往</span> <input type="text" value="1"
                                                                                                                                    class="text"> <span>页</span>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <!----->
            </div>

            <ol class="fix x_qx" style="margin-top:-20px;">
                <li id = "bm_cqu"><a href="javascript:;" class="s_cancel" id = "bm_cqu">取消</a></li>
                <li id="bm_queque"><a href="javascript:;" >确定</a></li>
            </ol>

        </div>
    </div>
</div>
<!-- 添加账号弹框end -->
<!-- 推送活动 bj33-->
<div class="m_xpopups J_xactivity">
    <div class="m_xpropell">
        <div class="wire"></div>
        <div class="title"><i class="J_xsutup"><img id="bm_ca1" src="<%=path%>/images/close.png" /></i>选择推送活动(最多只能选5个)</div>
        <div>
            <ul class="nav nav-tabs">
                <li class="active">
                    <a data-toggle="tab" href="#tab1" aria-expanded="true">选择活动</a>
                </li>
                <li class="">
                    <a data-toggle="tab" href="#tab2" aria-expanded="false" id="zdy">自定义链接</a>
                </li>
            </ul>
        </div>
        <div class="tab-content">
            <div id="tab1" class="tab-pane active">
                <div class="m_xswung" id="qufen" zdyClass="">
                    <ul class="s_role_condition fix ">
                        <li>关键字<input placeholder="输入关键字，支持模糊搜索" type="text" id="yewu_sosuo"></li>
                        <li><i><img src="<%=path%>/images/marketing/icon_search.png" id="yewu_sosuopic"></i></li>
                    </ul>
                    <ul class="flexibe" id="activity_list">


                    </ul>
                </div>
                <div class="m_xpages"style="padding: 0;">
                    <div class="mian">
                        <span>显示行数</span> <select><option>5</option>
                        <option>10</option>
                        <option>20</option></select> <span class="bm_tiao">共_条</span> <span class="bm_ye">页</span> <a
                            href="javascript:;" class="prev">上一页</a> <a href="javascript:;"
                                                                        class="next">下一页</a> <span>前往</span> <input type="text" value="1"
                                                                                                                    class="text"> <span>页</span>
                    </div>
                    <div class="m_xbutton m_xfinish">
                        <a href="javascript:;" class="white" id="bm_ququxiao">取消</a>
                        <a href="javascript:;" onclick="childFinish()" id="bm_wanwa">完成</a>
                    </div>
                </div>
            </div>
            <div id="tab2" class="tab-pane"><%--q2--%>
                <div class=" form-horizontal" id = "H5">
                    <div class="col-sm-1"></div>
                    <div class="col-sm-11"><h2 align="center">编辑H5展示内容</h2>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-1 control-label"><i style="color:red">*&nbsp;</i>图片</label>
                        <div class="col-lg-4"><%--bj003--%>
                            <div class="x_img_sc">
                                <img id="share_pic" style="width: 100px; height: 100px"src="<%=path%>/images/marketing/img_p.png">
                            </div>
                            <form  id='share_image' enctype='multipart/form-data'>
                                <input type="file" accept="image/gif,image/jpeg,image/x-png" id="inputfile" onchange="fileloadon()" name="filepath"
                                       style="filter: alpha(opacity = 50); -moz-opacity: 0.5; -khtml-opacity: 0.5; opacity: 0.0; position: absolute; z-index: 99;">
                                <p style="line-height:80px;color: #bdbdbd;"> &nbsp;&nbsp;(上传图片要求：尺寸为120×120像素，大小10K左右)</p>
                            </form>
                        </div>
                        <div class="clear-shadow col-lg-7"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label"><i style="color:red">*&nbsp;</i>标题</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id = "h5_biaoti" name="h5_biaoti" placeholder="请输入标题" >
                        </div>
                        <div class="clear-shadow"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label"><i style="color:red">*&nbsp;</i>简介</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id = "h5_jianjie" name="h5_jianjie" placeholder="请输入简介" >
                        </div>
                        <div class="clear-shadow"></div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label"><i style="color:red">*&nbsp;</i>地址</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id = "h5_url" name="h5_url" placeholder="请输入地址链接，仅支持移动端" >
                        </div>
                        <div class="clear-shadow"></div>
                    </div>
                    <div class="m_xbutton m_xfinish">
                        <a href="javascript:;" class="white" id="bm_ququxiao">取消</a>
                        <a href="javascript:;" onclick="childFinish()" id="h5_bm_wanwa">完成</a>
                    </div>
                </div>
            </div>

        </div>


    </div>
</div>
<!-- 添加门店 -->
<div class="x_popup_t">
    <div class="issue_t">
        <span><img src="<%=path%>/images/marketing/close.png" /></span>
        <h4>添加门店</h4>
        <ul class="fix">
            <li>
                <span><i>*</i>门店名称</span>
                <div class="s_input_box">
                    <input type="text" id = "bm_qming" placeholder="23字以内" maxlength="23"/>
                </div>
            </li>
            <li>
                <span><i>*</i>门店地址</span>
                <div class="s_input_box">
                    <input type="text" id = "bm_qaddress" placeholder="25字以内"  maxlength="25"/>
                </div>
            </li>
            <li>
                <span>电话</span>
                <div class="s_input_box">
                    <textarea class="form-control" placeholder="多个电话用“，”号分开" id ="bm_qphone"></textarea>
                </div>
            </li>
        </ul>
        <ol class="fix">
            <li><a href="javascript:;" class="s_cancel" id="bm_md_qxx">取消</a></li>
            <li><a href="javascript:;" class="s_next_step" id="bm_fque">确定</a></li>
        </ol>
    </div>
</div>

<!-- 添加门店 -->
<!-- 编辑门店 -->
<div class="x_popup_editor">
    <div class="issue_editor">
        <span><img src="<%=path%>/images/marketing/close.png" /></span>
        <h4>编辑门店</h4>
        <ul class="fix">
            <li>
                <span><i>*</i>门店名称</span>
                <div class="s_input_box">
                    <input type="text" id="bm_vname" placeholder="23字以内"  maxlength="23"/>
                </div>
            </li>
            <li>
                <span><i>*</i>门店地址</span>
                <div class="s_input_box">
                    <input type="text" id="bm_vaddress" placeholder="25字以内"  maxlength="25"/>
                </div>
            </li>
            <li>
                <span>电话</span>
                <div class="s_input_box">
                    <textarea class="form-control" placeholder="多个电话用“，”号分开" id = "bm_vphone"></textarea>
                </div>
            </li>
        </ul>
        <ol class="fix">
            <li><a href="javascript:;" class="s_cancel" id="bm_md_menmen">取消</a></li>
            <li><a href="javascript:;" class="s_next_step" id="bm_qued">确定</a></li>
        </ol>
    </div>
</div>
<div class="s_popup_delect2">
    <div class="s_consum">
        <p id="dialog_title"><img src="<%=path%>/images/marketing/s_tick.png" /> 活动启用成功</p>
    </div>
</div>
<%--搜索用户弹窗--%><%--bj1--%>
<div class="row m-b-lg x_selectuser" id="selectuser">
    <div class="col-sm-12 issue_selectuser" style="height: 635px">
        <div class="row" style="margin-left: -30px;margin-bottom: 20px;">
            <div class="col-sm-5">
                <div class="input-group">
                    <input placeholder="输入名字、电话号码进行搜索" class="form-control" type="text" id="bm_nameOrtel"> <span class="input-group-btn">
                                            <button class="btn btn-primary" type="button" id="bm_mohu">搜索</button> </span>

                </div>
            </div>
        </div>
        <div class="row" id="user_list">
        </div>
        <div class="m_xpages" style="    padding: 0;">
            <div class="mian">
                <%--<span>显示行数</span>
                <select>
                    <option>6</option>
                <option>12</option>
                <option>24</option>
                </select>--%> <span class="bm_tiao">共__条</span> <span class="bm_ye">页</span> <a
                    href="javascript:;" class="prev">上一页</a> <a href="javascript:;"
                                                                class="next">下一页</a> <span>前往</span> <input type="text" value="1"
                                                                                                            class="text"> <span>页</span>
            </div>
        </div>
        <div class="col-sm-12 text-center" style="margin-top:10px;">
            <button class="btn btn-w-m btn-primary" type="button" id="user_ok">确认</button>&nbsp;&nbsp;&nbsp;&nbsp;
            <button class="btn btn-w-m btn-white" type="button" id = "user_quxiao">取消</button>
        </div>
    </div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/bootcdn/BootCDN/ajax/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.js"></script>
<script type="text/javascript" src="<%=path%>/js/marketing/lengthlimit.js"></script>
<script type="text/javascript" src="<%=path%>/js/marketing/InputLimitedByidandlength.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/artDialog/7.0.0/dialog-plus.js"></script>
<script>
    var path = "<%=path%>";
    //qw1  选择业务
    $(document).on('click','.bm_yewu',function func_showActivityDetailDialog(){
        //$('.bm_yewu').click(function func_showActivityDetailDialog() {
        ActivityDetailDialog = dialog({
            id: "ActivityDetailDialog",
            fixed: true,
            width: 1000,
            height: 620,
            title: '业务列表',
            url: path + "/view/ui/activityDialig",
        });
        ActivityDetailDialog.showModal();
        $("iframe[name='ActivityDetailDialog']:visible").attr("scrolling", "auto").css("overflow-x", "hidden").css("overflow-y", "auto");
    })

    //选择我推荐
    $(document).on('click','.bm_wotuijian',function func_showActivity_tuijianDetailDialog(){
        //$('.bm_wotuijian').click(function func_showActivity_tuijianDetailDialog() {
        Activity_TuijianDetailDialog = dialog({
            id: "Activity_TuijianDetailDialog",
            fixed: true,
            width: 1000,
            height: 620,
            title: '活动列表',
            url: path + "/view/ui/tuijianDetailDialog",
        });
        Activity_TuijianDetailDialog.showModal();
        $("iframe[name='Activity_TuijianDetailDialog']:visible").attr("scrolling", "auto").css("overflow-x", "hidden").css("overflow-y", "auto");
    })



    //选择员工q1
    $(document).on('click','#bm_user_id',function(){
        userlist();
    })
    function loadUserAll(){
        $("#selectuser, .issue_selectuser").show();
        $("#bm_nameOrtel").val("");

        if(listIndex != 4){
            listIndex = 0;
        }
        listIndex = 4;
        //获取关键字
        pageSize = 6;
        key_word = $('#bm_nameOrtel').val();
        var url = "<%=path%>/api/account/loadUserAll";
        $.post(url,{
            "access_token" : access_token,
            "cid" : cid,
            "uid" : uid,
            "key_word" : key_word,
            "startIndex" : startIndex,
            "page_size" : pageSize
        },function(data){

            if(data.status == 200){
                userlistHtml(data.data);
                page(data.totalCount);
            }else{
                $('#user_list').html('');
            }

        });
    }
    //qq2
    // tempUserList = [];
    userInfo = new Object();
    $(document).on('click','.yewu_table2',function(){
        var rhe = $(this);
        $('#bm_userlist img').attr("src","<%=path%>/images/marketing/s_check_no.png");
        var src = $(this).attr("src");
        var url = "<%=path%>/businessCard/ajaxGetUserCardCount";
        $.post(url,{
            "userId" : $(this).attr("id"),
        },function(msg){
            if(msg==0){
                $(".yewu_table2").each(function(){
                    if($(this).hasClass("myActive")){
                        $(this).removeClass("myActive");
                        $(this).addClass("yewu_table");
                    }
                    rhe.addClass("myActive");
                    rhe.removeClass("yewu_table");
                })
                userInfo.id = rhe.attr("id");
                userInfo.name = rhe.children("h3").children("strong").text();
		        // var index = $(".yewu_table2").index(this);
		        // userInfo = tempUserList[index];
            }else {
                alert("该用户已经拥有名片，请重试");
                //promptDialog("该用户已经拥有名片，请重试");
            }
        })
    })


    $(document).on('click','.s_check',function(){
        var img_path = $(this).attr("src");
        var ids = $(this).attr("alt");
        var show_id = "info" + ids;
        if(img_path=="<%=path%>/images/marketing/s_check.png"){
            $(this).attr("src","<%=path%>/images/marketing/s_check_no.png");
            $("#"+show_id+"").hide();
            if(ids==1){
                $("#info11").hide();
            }
        }else{
            $(this).attr("src","<%=path%>/images/marketing/s_check.png");
            $("#"+show_id+"").show();
            if(ids==1){
                $("#info11").show();
            }
        }

        /* $(".x_popup_editor,.issue_editor").show(); */
    });


    //点击取消弹框消失（编辑门店）
    $('#bm_md_menmen').click(function(){
    });
    //点击取消弹框消失（添加门店）
    $('#bm_md_qxx').click(function(){
        $(".x_popup_t,.issue_t").hide();
    });

    $('.J_xcode').click(function () {
        var $this = $(this),
            _this = this,
            i = 60;
        _this.disabled = 'disabled';
        clearInterval(repeat);
        var repeat = setInterval(function () {
            i--;
            if (i == 0) {
                _this.disabled = false;
                $this.removeClass('gray').val('获取验证码');
                clearInterval(repeat);
            } else {
                $this.addClass('gray').val(i + 's后重新获取');
            }
        }, 1000);
    })
    $('.J_xcodes').click(function () {
        var $this = $(this),
            _this = this,
            i = 60;
        _this.disabled = 'disabled';
        clearInterval(repeat);
        var repeat = setInterval(function () {
            i--;
            if (i == 0) {
                _this.disabled = false;
                $this.removeClass('gray').val('获取验证码');
                clearInterval(repeat);
            } else {
                $this.addClass('gray').val(i + 's后重新获取');
            }
        }, 1000);
    })

    $(".x_list02").click(function () {
        $(".x_list_center02 ,.x_popup_add,.issue_add").show();
        $(".x_CheckBox_pic").click(function () {
            var cutsrc = $(".x_CheckBox_pic").attr('src');
            if (cutsrc == "<%=path%>/images/marketing/s_check_no.png") {
                $(".x_CheckBox_pic").attr('src', '<%=path%>/images/marketing/s_check.png');
                $(".ibox-content").find(".x_CheckBox").attr('src', '<%=path%>/images/marketing/s_check.png');
            } else {
                $(".x_CheckBox_pic").attr('src', '<%=path%>/images/marketing/s_check_no.png');
                $(".ibox-content").find(".x_CheckBox").attr('src', '<%=path%>/images/marketing/s_check_no.png');
            }
        });
        var bool = false;
        $(".ibox-content").find(".x_CheckBox").click(function () {
            if ($(this).attr("src") == "<%=path%>/images/marketing/s_check_no.png")
                $(this).attr('src', '<%=path%>/images/marketing/s_check.png');
            else
                $(this).attr('src', '<%=path%>/images/marketing/s_check_no.png');

            var rr = $(".ibox-content").find(".x_CheckBox");
            if (rr != 0) {
                $(".x_CheckBox_pic").attr('src', '<%=path%>/images/marketing/s_check_no.png');
            } else {
                $(".x_CheckBox_pic").attr('src', '<%=path%>/images/marketing/s_check.png');
            }
            for (i = 0; i < 3; i++) {
                if (rr[i].attributes[1].nodeValue == "<%=path%>/images/marketing/s_check_no.png") {
                    bool = true;
                    break;
                }
            }

            if (bool == false) {
                $(".x_CheckBox_pic").attr('src', '<%=path%>/images/marketing/s_check.png');
            } else {
                $(".x_CheckBox_pic").attr('src', '<%=path%>/images/marketing/s_check_no.png');
            }
        });



    });
    $('.issue_add > span').click(function () {
        $('.x_popup_add,.issue_add').hide();
        $(".x_popup_editor,.issue_editor").hide();
    });
    //此处修改，关闭搜索用户框
    $('.issue_selectuser > span').click(function () {
        $('.x_selectuser,.issue_selectuser').hide();
    });

    $(".x_button_add").click(function () {
        $('#bm_qming').val('');
        $('#bm_qaddress').val('');
        $('#bm_qphone').val('');
        $(".x_popup_t,.issue_t").show();
        $(".x_popup_editor,.issue_editor").hide();
    })
    $(".issue_t span").click(function () {
        $(".x_popup_t,.issue_t").hide();
        $(".x_popup_editor,.issue_editor").hide();
    })

    $(".issue_editor span").click(function () {
        $(".x_popup_editor,.issue_editor").hide();
        $(".x_popup_t,.issue_t").hide();
    })



    $(".x_list03").click(function () {
    });

    $(".x_list04").click(function () {
    });

</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/marketing/actionCustomer.js"></script>
<script type="text/javascript" src="<%=path%>/js/marketing/qrcode.js"></script>
<script type="text/javascript" src="<%=path%>/js/marketing/dialog.js"></script>
<script src="<%=path%>/hplus/js/plugins/sweetalert/sweetalert2.min.js"></script>

<script type="text/javascript">
    /* 二维码名片生成 */

    var qrcode = new QRCode(document.getElementById("qrcode"), {
        width : 125,
        height : 125
    });

    function makeCode(){

        var a,b=$("#bm_cname").val();
        var c=$("#name").val();
        var d=$("#bm_cjob").val();
        var e=$("#adr").val();
        var f=$("#focusedInput").val();
        var g=$("#bm_cmoblie").val();
        var h=$("#home").val();
        var i=$("#url").val();
        var j=$("#bm_cmail").val();
        var k=$("#bday").val();


        a = "BEGIN:VCARD";
        if( b!=null || b!=""){
            a+="\r\nN:"+b+";";
        }
        if( d!=null || d!=""){
            a+="\r\nTITLE:"+d;
        }
        if( g!=null || g!=""){
            a+="\r\nTEL;CELL,VOICE:"+g;
        }
        if( j!=null || j!=""){
            a+="\r\nEMAIL;PREF;INTERNET:"+j;
        }
        if(f!=null || f!=""){
            a+="\r\nORG:"+f;
        }
        a += "END:VCARD";
        /* a = "BEGIN:VCARD
            VERSION:3.0
            FN:任侠
            TEL;CELL;VOICE:15201280000
            TEL;WORK;VOICE:010-62100000
            TEL;WORK;FAX:010-62100001
            EMAIL;PREF;INTERNET:lzw#lzw.me
            URL:http://lzw.me
            orG:志文工作室
            ROLE:产品部
            TITLE:CTO
            ADR;WORK;POSTAL:北京市朝阳区北四环中路35号;100101
            REV:2012-12-27T08:30:02Z
            END:VCARD"; */
        if (!a) {
            return;
        }
        qrcode.makeCode(a);
    }
    //点击暂存
    $('.x_button_y').click(function(){
        makeCode();
        zansave();
    });

    //从其他页面进入该页面是执行方法  p2
    $(function(){
        $(document).on("keyup","#focusedInput,#bm_cname,#bm_cjob,#bm_cmoblie,#bm_czuoji,#bm_cmail,#bm_cweixin,#bm_cweibo,#bm_cqq,#bm_cziding",function(e){
            reloadLeft();
        });
        
        cardId = getQueryString("card_id");
        if(StringEmpty(cardId)){
            queryCard(cardId);

        }else{
            drawCompanyInfo();
        }


    });
    //进入门店后点击取消
    $('#bm_cqu').click(function(){
        $('.x_popup_add,.issue_add').hide();
    });

    //此处修改，进入用户搜索点击取消关闭
    $('#user_quxiao').click(function(){
        $('.x_selectuser,.issue_selectuser').hide();
    });

    var access_token=$.cookie('access_token');
    var cid=$.cookie('cid');
    var uid=$.cookie('uid');
    var companyName;
    var userName;
    //var headPicture;
    var mpname;
    var job;
    var mobile;
    var zuoMobile;
    var mail;
    var weixin;
    var weibo;
    var qq;
    var userdefined;
    //var erCode;
    var mdStore;
    //门店参数
    var store_names=new Array();
    var store_ids=new Array();
    var store_phone=new Array();
    var store_address=new Array();

    //用户参数
    var user_ids =  new Array();
    var user_name =  new Array();
    var user_phone =  new Array();

    //标记编辑活动是否保存
    var save_tag=false;

    var save_xia=false;
    var cardId;

    var qrcode_pic;
    var head_pic;



    //暂存后点击下一步
    $('#md_x_button').click(function(){
        save_xia = true;
        zansave();
    });
    //编辑名片时边显示
    function reloadLeft(){
        //员工姓名
        userName = $("#bm_user_id").val();
       
        //企业名称
        companyName = $("#focusedInput").val();
        $("#cc_name").text(companyName);
        //姓名
        mpname = $("#bm_cname").val();
        $("#cc_nname").text(mpname);
        //职务
        job = $("#bm_cjob").val();
        $("#cc_job").text(job);
        //座右铭
        userdefined = $("#bm_cziding").val();
        if(StringEmpty(userdefined)){
            var html = '<img src="<%=path%>/images/marketing/icon_plume.png"/>&nbsp;&nbsp;';
            $("#cc_zuoyou").html(html+userdefined);
        }else{
            $('#cc_zuoyou').html('');
        }

        //手机号码
        mobile = $("#bm_cmoblie").val();
        var html = '<img src="<%=path%>/images/marketing/icon11.png" />&nbsp;&nbsp;';
        $("#cc_phone").html(html+mobile);

        //座机
        zuoMobile = $("#bm_czuoji").val();
        if(StringEmpty(zuoMobile)){
            var html = '<img src="<%=path%>/images/marketing/icon22.png" />&nbsp;&nbsp;';
            $("#cc_zuoji").html(html+zuoMobile);
        }else{
            $('#cc_zuoji').html('');
        }

        //邮箱
        mail = $("#bm_cmail").val();
        if(StringEmpty(mail)){
            var html = '<img src="<%=path%>/images/marketing/icon33.png" />&nbsp;&nbsp;';
            $("#cc_mail").html(html+mail);
        }else{
            $('#cc_mail').html('');
        }

        //微信
        weixin = $("#bm_cweixin").val();
        if(StringEmpty(weixin)){
            var html = '<img src="<%=path%>/images/marketing/icon55.png" />&nbsp;&nbsp;';
            $("#cc_weixin").html(html+weixin);
        }else{
            $('#cc_weixin').html('');
        }


        //微博
        weibo = $("#bm_cweibo").val();
        if(StringEmpty(weibo)){
            var html = '<img src="<%=path%>/images/marketing/icon66.png" />&nbsp;&nbsp;';
            $("#cc_weibo").html(html+weibo);
        }else{
            $('#cc_weibo').html('');
        }


        //qq
        qq = $("#bm_cqq").val();
        if(StringEmpty(qq)){
            var html='<img src="<%=path%>/images/marketing/icon44.png" />&nbsp;&nbsp;';
            $("#cc_qq").html(html+qq);
        }else{
            $('#cc_qq').html('');
        }

    }

    //点击取消
    $('#card_quxiao').click(function(){
        window.location.href = "<%=path%>/view/ui/cardHome";
    });

    //暂存r1
    function zansave(){
    	save_xia = true;
    	
        var userName = $("#bm_user_id").val();
        if(!StringEmpty(userName)){
            promptDialog("请选择员工！！！");
            save_xia=false;
            return;
        }else if(!StringEmpty(companyName)){
            promptDialog("请输入公司名称！！！");
            save_xia=false;
        }else if(!StringEmpty(mpname)){
            promptDialog("请输入姓名！！！");
            save_xia=false;
        }else if(!StringEmpty(job)){
            promptDialog("请输入职务！！！");
            save_xia=false;
        }else if(!StringEmpty(mobile)){
            promptDialog("请输入手机号码！！！");
            save_xia=false;
        }
        
        if(StringEmpty(companyName)&&StringEmpty(mpname)&&StringEmpty(job)&&StringEmpty(mobile)){
            if(!telPhone(mobile)){
                promptDialog("你输入的手机号码格式错误,请重试");
                save_xia = false;
            }else if(StringEmpty(mail)&&!memail(mail)){
                promptDialog("请您输入正确的邮箱格式");
                save_xia = false;
            }else if(!mqq(qq)&&StringEmpty(qq)){
                promptDialog("请您输入正确的qq格式");
                save_xia = false;
            }else if(!zuoj(zuoMobile)&&StringEmpty(zuoMobile)){
                promptDialog("请您输入正确的座机格式");
                save_xia = false;
            }else{
                //修改微门户门店       此处代码功能下线 - 2018-05-20 - Yangcl
                /* if(goumen == "0"){
                    updateMicro();
                    $('#info11').show();
                    $('#info1').show();
                } */
            }
        }

        if(save_xia){
	        var pageType = "${param.type}";
	        if(pageType == "create" || pageType == "copy" || pageType == ""){        // 保存操作
	        	saveCompanyCard();
	        } if(pageType == "edit"){      // 更新操作
	        	updateCompanyCard();
	        }
        }
    }
    
    
    
    
    var goumen=0;
    var gouye=0;
    var goutui=0;

    //判断是否勾选(门店)
    $(document).on('click','#bm_men_dian .s_check',function(){
        var src = $(this).attr("src");
        if(src=="<%=path%>/images/marketing/s_check_no.png"){
            <%-- alert(11);
            $(this).attr('src','<%=path%>/images/marketing/s_check.png'); --%>
            goumen = 1;
        }else {
            <%-- 	alert(22);
                $(this).attr('src','<%=path%>/images/marketing/s_check_no.png'); --%>
            goumen = 0;
        }
    });
    //判断是否勾选(业务)
    $(document).on('click','#bm_ye_wu_gou img',function(){
        var src = $(this).attr("src");
        if(src=="<%=path%>/images/marketing/s_check.png"){
            <%--  $('#bm_ye_wu_gou img').attr('src','<%=path%>/images/marketing/s_check_no.png'); --%>
            gouye = 0;
        }else {
            <%--  $('#bm_ye_wu_gou img').attr('src','<%=path%>/images/marketing/s_check.png'); --%>
            gouye = 1;
        }
    });
    //判断是否勾选(推荐)
    $(document).on('click','#bm_tui_tui img',function(){
        var src = $(this).attr("src");
        if(src=="<%=path%>/images/marketing/s_check.png"){
            <%-- $('#bm_tui_tui img').attr('src','<%=path%>/images/marketing/s_check_no.png'); --%>
            goutui = 0;
        }else {
            <%-- $('#bm_tui_tui img').attr('src','<%=path%>/images/marketing/s_check.png'); --%>
            goutui = 1;
        }
    });


    //bj7
    function saveCompanyCard(){
        /* var mdstore= $('#bm_md_list').children();
        var md_str = '';
        for(var i = 0 ; i < mdstore.length ;i++){
            if(i == mdstore.length - 1){
                md_str += $(mdstore[i]).text();
            }else{
                var z = $(mdstore[i]).text() + ",";
                md_str += z;
            }
        } */
        var url = "<%=path%>/businessCard/ajaxCreateCard";
        $.post(url,{
            "cid" : cid,
            "companyName" : companyName,
            "name" : mpname,
            "job" : job,
            "mobile" : $("#bm_cmoblie").val(),
            "telephone" : $("#bm_czuoji").val(),
            "mail" : $("#bm_cmail").val(),
            "weixin" : $("#bm_cweixin").val(),
            "weibo" : $("#bm_cweibo").val(), 
            "qq" : $("#bm_cqq").val(),
            "mdStore" : $("#store-id").attr("storeZid"),
            "headPicture":$("#card_image").attr("src") ,  
            "type" : type,
            "erCode":qrcode_pic,
            "showInterprise" : 1,
            "showBusiness" : 1,
            "showRecommend" : 1,
            "userId" : user_id , 
            "motto": $('#bm_cziding').val() 
        },function(e){
            if(e.status == 200){
                var cardId = e.data.id;
                save_tag = true;
                var yeIds = new Array();
                $('.deleteye').each(function(j,d){
                    var yyid = $(this).attr('yid');
                    yeIds[j] = yyid;
                });
                definedIds = yeIds.join(",");
                //推荐id
                var tuiIds = new Array();
                //	var sysIds;
                $('.deletehuo').each(function(j,d){
                    var ttuid = $(this).attr('tid');
                    tuiIds[j] = ttuid;
                });
                sysIds = tuiIds.join(",");   
                if(gouye == '0'){
                    // definedIds = [];    TODO 业务信息是否显示：1显示0不显示   如果不显示是否还需要复制？？
                    saveYeActivity(cardId);
                }else if(gouye == '1') {
                    saveYeActivity(cardId)
                }

                if(goutui == '0'){
                    // sysIds = [];     TODO 推荐信息是否显示：1显示0不显示 如果不显示是否还需要复制？？
                    saveTuiActivity(cardId);
                }else if(goutui == '1'){
                    saveTuiActivity(cardId);
                }
            }else{
                promptDialog("保存失败" , e.message); 
            }
            // successDialog("保存成功");
            location.href= path + "/view/ui/cardHome";
        });
    }


    //二次点击暂存时进行的修改操作  bj8
    function updateCompanyCard(){
        /* var mdstore= $('#bm_md_list').children();
        var md_str = '';
        for(var i = 0 ; i < mdstore.length ;i++){
            if(i == mdstore.length - 1){
                md_str += $(mdstore[i]).text();
            }else{
                var z = $(mdstore[i]).text() + ",";
                md_str += z;
            }
        } */
        var cardName = $("#bm_cname").val();
        var storeId = $("#store-id").attr("storeZid");
        if (typeof storeId === "undefined") {
        	storeId = "";
        }
        var url = "<%=path%>/businessCard/ajaxUpdateCard";
        $.post(url,{
        	"id":businessCardInfoId,
            "cid" : cid,
            "companyName" : companyName,
            "name" : mpname,
            "job" : job,
            "mobile" : mobile,
            "telephone" : zuoMobile,
            "mail" : mail,
            "weixin" : weixin,
            "weibo" : weibo,
            "qq" : qq,
            "userdefined" : userdefined,
            "mdStore" : storeId, 
            "headPicture":head_pic,
            "type" : type,
            "erCode":qrcode_pic,
            "showInterprise" : 1,
            "showBusiness" : 1,
            "showRecommend" : 1,
            "userId" : user_id,
            "motto": $('#bm_cziding').val() 
        },function(data){
            if (data.status == 200) {
                var yeIds = new Array();
                // var definedIds;
                $('.deleteye').each(function(j,d){
                    var yyid = $(this).attr('yid');
                    yeIds[j]=yyid;
                });
                definedIds = yeIds.join(",");
                //推荐id
                var tuiIds = new Array();
                //	var sysIds;
                $('.deletehuo').each(function(j,d){
                    var ttuid = $(this).attr('tid');
                    tuiIds[j]=ttuid;
                });
                sysIds=tuiIds.join(",");
                // console.log("修改业务id:----------"+definedIds);
                //console.log("修改推荐id:----------"+sysIds);
                if(gouye == '0'){
                    yeupdateActivity(cardId);
                }else if(gouye == '1') {
                    definedIds = [];
                    yeupdateActivity(cardId)
                }

                if(goutui == '0'){
                    tuiupdateActivity(cardId);
                }else if(goutui == '1'){
                    sysIds = [];
                    tuiupdateActivity(cardId);
                }

               successDialog("保存成功");
            }else{
            	errorDialog("保存失败");
            }
        })
        
    };

    // 操作成功 - Yangcl
	function successDialog(title_){
		swal({
			  title: title_ , 
			  type: 'success',
			  showCancelButton: false,
			  confirmButtonColor: '#1BB293', 
			  confirmButtonText: '确定' 
			}).then(function () {
				location.href= path + "/view/ui/cardHome";
			})
	}

    //门店名称
    var mdname;
    //地址
    var address;
    //电话
    var phone;
    //门店id
    var id;
    //关键字
    var key_word;
    //名片id

    var activity_id;
    
    var businessCardInfoId = null;  

    //点击选择门店bj4
    $('#bm_cmen').click(function(){
        $('#bm_men_dian img').attr('src','<%=path%>/images/marketing/s_check.png');
        goumen = 0;
        bmstore();
    });

    //点击搜索门店
    $('#bm_csous').click(function(){
        bmstore();
    });
    //点击索搜所有用户
    $('#bm_mohu').click(function(){
        userlist();
    });
    //查询所有用户bj2
    function userlist(){
        $("#selectuser, .issue_selectuser").show();
        if(listIndex != 4){
            listIndex = 0;
        }
        listIndex = 4;
        pageSize = 6;
        //获取关键字
        key_word = $('#bm_nameOrtel').val(); 
        var url = "<%=path%>/account/ajaxAccountDialogUserList";
        $.post(url,{
            "access_token" : access_token,
            "cid" : cid,
            "uid" : uid,
            "keyWord" : key_word,
            "startIndex" : startIndex,
            "pageSize" : pageSize
        },function(e){
            if(e.status == 200){
                userlistHtml(e.data);
                page(e.totalCount);
            }else{
                $('#user_list').html(e.status + ':' + e.message);
            }

        });
    }
    //查询所有门店
    function bmstore(){
        if(listIndex != 1){
            listIndex = 0;
        }
        listIndex = 1;
        //获取关键字
        key_word = $('#bm_keyword').val();
        var url = "<%=path%>/store/ajaxStorePageList";
        $.post(url,{
            "access_token" : access_token,
            "cid" : cid,
            "uid" : uid,
            "keyWord" : key_word,
            "startIndex" : startIndex,
            "pageSize" : pageSize
        },function(data){

            if(data.status == 200){
                storeHtml(data.data);
                page(data.totalCount);
            }/* else if(data.error_code == 1){

    		} */else{
                $('#bm_cstore').html('');
            }

        });
    }
    //编辑时获取门店id
    $(document).on('click','.x_editor_bj',function(){
        storeId = $(this).attr("sid");
        queryOne();
        $(".x_popup_editor,.issue_editor").show();
    });
    //编辑门店后点确定触发接口方法
    $('#bm_qued').click(function(){
        editstore();

    });
    //编辑门店
    function editstore(){
        //获取编辑的名称
        var mdname = $('#bm_vname').val();
        //获取编辑的地址
        var address = $('#bm_vaddress').val();
        //获取编辑的电话
        var phone = $('#bm_vphone').val();
        if(StringEmpty(mdname)&&StringEmpty(address)){
            var url = "<%=path%>/store/ajaxUpdateStore";
            $.post(url,{
                "access_token" : access_token,
                "cid" : cid,
                "uid" : uid,
                "id" : storeId,
                "name" : mdname,
                "address" : address,
                "phone" : phone,
            },function(data){

                if(data.error_code == "0"){
                    bmstore();
                    promptDialog("编辑成功！！");
                    $(".x_popup_editor,.issue_editor").hide();
                }else if(data.error_code == "4"){
                    promptDialog("该门店已存在，请勿重复编辑");
                }else{
                    promptDialog("编辑失败，请重试！!!");
                }
            });
        }else if(!StringEmpty(mdname) && !StringEmpty(address)){
            promptDialog("请输入门店信息！！！");
        }else if(!StringEmpty(mdname)){
            promptDialog("请输入门店名称！！！");
        }else if(!StringEmpty(address)){
            promptDialog("请输入门店地址！！！");
        }/* else if(!StringEmpty(phone)){
        	  showDialog("请输入手机号码！！！");
          } */
    }
    $('#bm_md_menmen').click(function(){
        $(".x_popup_editor,.issue_editor").hide();
    });

    //根据id查询门店
    function queryOne(){
        //  var storeId = $(this).attr("sid");
        var url = "<%=path%>/store/ajaxGetStoreDetail";
        $.post(url,{
            "access_token" : access_token,
            "cid" : cid,
            "uid" : uid,
            "storeId" : storeId,
        },function(data){

            if(data.status == 200){
                storexianHtml(data.data);
            }else if(data.error_code == 1){
            }

        });
    }
    //编辑门店时显示出来
    function storexianHtml(data){
        //门店名称
        $('#bm_vname').val(data.name);
        //门店地址
        $('#bm_vaddress').val(data.address);
        //手机号码
        $('#bm_vphone').val(data.phone);

    }


    //勾选
    $(document).on('click','#bm_cstore img',function(){
        //替换门店地址
        //$("#micro_address").html($(this).attr("bmstore_address"));
        //替换手机号码
        //$("#micro_phone").html($(this).attr("bmstore_phone"));


        $('#bm_cstore img').attr("src","<%=path%>/images/marketing/s_check_no.png");
        var src = $(this).attr("src");
        mdstore="";
        if(src=="<%=path%>/images/marketing/s_check_no.png"){
            $(this).attr("src","<%=path%>/images/marketing/s_check.png");
            mdname = $(this).attr("cname");
            var html = '';
        }else{
            $(this).attr("src","<%=path%>/images/marketing/s_check_no.png");
        }
        $('#bm_md_list').html(html);
    });

    $(document).on('click','.delete_md_detail img',function(){
        $('#bm_men_dian img').attr('src','<%=path%>/images/marketing/s_check_no.png');
        goumen = 1;
        $(this).remove();
        $('.delete_md_detail').remove();
        $('#info11').hide();
        $('#info1').hide();
    });


    //勾选后点击确定  用户确认user_ok  bj6
    var user_id;
    $('#user_ok').click(function(){
        $('.x_selectuser,.issue_selectuser').hide();
        if(userInfo != null){
	        var name = userInfo.name;
	        user_id = userInfo.id;
	        $('#bm_user_id').val(name);
        }
        
    });
    //勾选后点击确定jj2
    $('#bm_queque').click(function(){
        $('.x_popup_add,.issue_add').hide();
        <%--  store_names.length=0;
        store_ids.length=0;
       $("#bm_cstore .x_CheckBox[src$='s_check.png']").each(             这代码写的，简直了。。。。。。
            function(i, d) {
                var mdname = $(this).attr("cname");
                var phone = $(this).attr("bmstore_phone");
                var address = $(this).attr("bmstore_address");
                var storewmid = $(this).attr("id");

                store_names[i]=mdname;
                store_address[i]=address;
                store_phone[i]=phone;
                store_ids[i]=storewmid;
                store_ids[i]=this.id;
            });
        var html='';
        for(var i in store_names){
            //$('#micro_name').html(store_names[i]);
            $('#micro_address').html('<img src="<%=path%>/images/marketing/icon_address.png" />'+' '+store_address[i]+'</li>');
            $('#micro_phone').html('<img src="<%=path%>/images/marketing/icon_phone.png" />'+' '+store_phone[i]+'</li>');
            //暂存时获取数据
            html += '<li class="delete_md_detail" cid="'+store_names[i]+'" >'+store_names[i]+'<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li>';
        } --%>
        
        $("#bm_cstore .x_CheckBox[src$='s_check.png']").each(
                function(i, d) { 
	                $('#micro_address').html('<img src="<%=path%>/images/marketing/icon_address.png" />' + $(this).attr("bmstore_address") + '</li>');
	                $('#micro_phone').html('<img src="<%=path%>/images/marketing/icon_phone.png" />' + $(this).attr("bmstore_phone") + '</li>');
	                
	                var html = '<li id="store-id" class="delete_md_detail" storeZid="' + this.id + '" >' + $(this).attr("cname") + '<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li>';
			        $('#bm_md_list').html(html);
          }); 
        $('#info11').show();
        $('#info1').show();

    });
    //删除门店
    //点击删除触发方法
    $(document).on('click','.deleted',function(){
        $('.s_popup_delect,.issue_delect').show();
        storeeId = $(this).attr("cid");
        /* deleteStore(); */
    });

    //点击取消隐藏
    $('#bm_shan_men').click(function(){
        $(".s_popup_delect,.issue_delect").hide();
    });

    //点击确定隐藏
    $('#bm_shan_que').click(function(){
        $(".s_popup_delect,.issue_delect").hide();
    });
    //打叉是隐藏
    $('#bm_md_cha').click(function(){
        $(".s_popup_delect,.issue_delect").hide();
    });

    //删除门店
    function deleteStore(){
        var url = "<%=path%>/store/ajaxDeleteStore";
        var lineId = '#line'+storeeId;
        $.post(url,{
            "access_token" : access_token,
            "cid" : cid,
            "uid" : uid,
            "storeId" : storeeId,
        },function(data){

            if(data.error_code == "0"){
                bmstore();
                successDialog("删除成功！！！");
                $(lineId).remove();
            }else if(data.error_code == "2"){
                promptDialog("该门店已被选用，请勿删除");
            }else if(data.error_code == "1"){
                promptDialog("删除失败！！！");
            }else{
                promptDialog("系统出错");
            }
        });
    }



    //添加门店操作  bug1
    function showView(){
        $(".x_popup_add,.issue_add").show();
        $(".x_popup_t,.issue_t").show();
    }
    function hideView(){
        $(".x_popup_t,.issue_t").hide();
        //$(".x_popup_add,.issue_add").hide();
    }
    function saveStore(){
        var cname = $('#bm_qming').val();
        var caddress = $('#bm_qaddress').val();
        var cphone = $('#bm_qphone').val();
        if(StringEmpty(cname)&&StringEmpty(caddress)){
            var url = "<%=path%>/store/ajaxCreateStore";
            $.post(url,{
                "access_token" : access_token,
                "cid" : cid,
                "uid" : uid,
                "name" : cname,
                "address" : caddress,
                "phone" : cphone,
            },function(data){

                if(data.error_code == "0"){
                    bmstore();
                    hideView();
                    alert("添加门店成功！！！");
                }else if(data.error_code == "4"){
                    hideView();
                    alert("该门店已存在，请勿重复创建");
                }else{
                    hideView();
                    alert("添加门店失败！！！");
                }
            });
        }else if(!StringEmpty(cname) && !StringEmpty(caddress) && !StringEmpty(cphone)){
            //hideView();
            alert("请输入门店信息！！！");
            //setTimeout("showView()",1000)
        }else if(!StringEmpty(cname)){
            //hideView();
            alert("请输入门店名称！！！");
            //setTimeout("showView()",1000)
        }else if(!StringEmpty(caddress)){
            //hideView();
            alert("请输入门店地址！！！");
            //setTimeout("showView()",1000)
        }else if(!StringEmpty(cphone)){
            //hideView();
            alert("请输入手机号码！！！");
            //setTimeout("showView()",1000)
        }

    }
    //qq1
   function userlistHtml(data) {
       // tempUserList = data;
       if (data == undefined) {
           return;
       }
       var html = "";
       for (var i = 0; i < data.length; i++) {
           var result = data[i];
           if (result.id == user_id) {
               html += '<div class="col-sm-4 yewu_click" style="padding-left:0;"><div id = "' + result.id + '"  class="contact-box myActive yewu_table2"><h3><span>&nbsp;</span><strong>' + (result.name == undefined ? "" : result.name) + '</strong></h3>'
               html += '<p><span>部门:</span>' + (result.departmentName == undefined ? "" : result.departmentName) + '</p><p class="s_md"><span>门店:</span><span title="' + (result.stores == undefined ? "" : result.stores) + '">' + (result.stores == undefined ? "" : result.stores) + '</span></p>';
               html += '<p><span>手机:</span>' + (result.phone == undefined ? "" : result.phone) + '</p><div class="clearfix"></div></div></div>';
           } else {
               html += '<div class="col-sm-4 yewu_click" style="padding-left:0;"><div id = "' + result.id + '"  class="contact-box yewu_table yewu_table2"><h3><span>&nbsp;</span><strong>' + (result.name == undefined ? "" : result.name) + '</strong></h3>'
               html += '<p><span>部门:</span>' + (result.departmentName == undefined ? "" : result.departmentName) + '</p><p class="s_md"><span>门店:</span><span title="' + (result.stores == undefined ? "" : result.stores) + '">' + (result.stores == undefined ? "" : result.stores) + '</span></p>';
               html += '<p><span>手机:</span>' + (result.phone == undefined ? "" : result.phone) + '</p><div class="clearfix"></div></div></div>';
           }
           $('#user_list').html(html);
       }
   }
    //显示门店方法
    function storeHtml(data){
        var html = "";
        var tag=false;
        for(var i=0;i<data.length;i++){
            html += '<tr id = "line'+data[i].id+'">'
            if(store_ids.length<1){
                html += '<td><div title="'+data[i].name+'" style="width:14em; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"><img id="'+data[i].id+'" src="<%=path%>/images/marketing/s_check_no.png" class="x_CheckBox" _id="27" cname="' + data[i].name + '" bmstore_phone="'+data[i].phone+'" bmstore_address="'+data[i].address+'"/>&nbsp;&nbsp;' + data[i].name + '</div></td>';
            }else{
                for(var j=0;j<store_ids.length;j++){
                    if(data[i].id==store_ids[j]){
                        tag=true;
                    }
                }
                if(tag){
                    html += '<td><div title="'+data[i].name+'" style="width:14em; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"><img id="'+data[i].id+'" src="<%=path%>/images/marketing/s_check.png" class="x_CheckBox" _id="27" cname="' + data[i].name + '" bmstore_phone="'+data[i].phone+'" bmstore_address="'+data[i].address+'"/>&nbsp;&nbsp;' + data[i].name + '</div></td>';
                }else{
                    html += '<td><div title="'+data[i].name+'" style="width:14em; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"><img id="'+data[i].id+'" src="<%=path%>/images/marketing/s_check_no.png" class="x_CheckBox" _id="27" cname="' + data[i].name + '" bmstore_phone="'+data[i].phone+'" bmstore_address="'+data[i].address+'"/>&nbsp;&nbsp;' + data[i].name + '</div></td>';
                }
            }
            html += '<td><div title="'+data[i].address+'" style="width:14em; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">' + data[i].address + '</div></td>';
            html += '<td><div title="'+data[i].phone+'" style="width:14em; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">' + data[i].phone + '</div></td>';
            tag=false;

        }
        $('#bm_cstore').html(html);
    }
    //二次点击暂存时进行的修改操作
    function cardHtml(data){
        $('#cc_name').text(data.companyName);
        if(!data.headPicture == ""){
            $('#head_pic').attr("src",data.headPicture);
        }
        $('#cc_nname').text(data.name);
        $('#cc_job').text(data.job);

        var zuoyouhtml = '<img src="<%=path%>/images/marketing/icon_plume.png"/>&nbsp;&nbsp;';
        $('#cc_zuoyou').html(zuoyouhtml+data.motto);

        var phonehtml = '<img src="<%=path%>/images/marketing/icon11.png" />&nbsp;&nbsp;';
        $('#cc_phone').html(phonehtml+data.mobile);

        var zuojihtml = '<img src="<%=path%>/images/marketing/icon22.png" />&nbsp;&nbsp;';
        $('#cc_zuoji').html(zuojihtml+data.telephone);

        var mailhtml = '<img src="<%=path%>/images/marketing/icon33.png" />&nbsp;&nbsp;';
        $('#cc_mail').html(mailhtml+data.mail);

        var wxhtml = '<img src="<%=path%>/images/marketing/icon55.png" />&nbsp;&nbsp;';
        $('#cc_weixin').html(wxhtml+data.weixin);

        var wbhtml = '<img src="<%=path%>/images/marketing/icon66.png" />&nbsp;&nbsp;';
        $('#cc_weibo').html(wbhtml+data.weibo);

        var qqhtml = '<img src="<%=path%>/images/marketing/icon44.png" />&nbsp;&nbsp;';
        $('#cc_qq').html(qqhtml+data.qq);


        if(!StringEmpty(data.motto)){
            $('#cc_zuoyou').html('');
        }
        if(!StringEmpty(data.telephone)){
            $('#cc_zuoji').html('');
        }
        if(!StringEmpty(data.mail)){
            $('#cc_mail').html('');
        }
        if(!StringEmpty(data.weixin)){
            $('#cc_weixin').html('');
        }
        if(!StringEmpty(data.weibo)){
            $('#cc_weibo').html('');
        }
        if(!StringEmpty(data.qq)){
            $('#cc_qq').html('');
        }
    }

   

    //把填的信息填充上
    function cardyHtml(data){
        $("#focusedInput").val(data.companyName);
        //头像
        if(!data.headPicture == ""){
            $('#card_image').attr("src",data.headPicture);
        }
        $('#bm_cname').val(data.name);
        $('#bm_cjob').val(data.job);
        $('#bm_cmoblie').val(data.mobile);
        $('#bm_czuoji').val(data.telephone);
        $('#bm_cmail').val(data.mail);
        $('#bm_cweixin').val(data.weixin);
        $('#bm_cweibo').val(data.weibo);
        $('#bm_cqq').val(data.qq);
        $('#bm_cziding').val(data.motto);
        makeCode();
    }
    
    oldActivityIds = "";      // 编辑时，保存旧的id
    //从其他页面进入时执行该方法   查询你该名片的详细信息（我的名片里的所有信息）
    function queryCard(cardId){
        var url = "<%=path%>/businessCard/ajaxCompanyCardDetail";
        $.post(url,{
            "access_token" : access_token,
            "cid" : cid,
            "uid" : uid,
            "id" :cardId,
        },function(e){
            if(e.status == 200){
              <%--   $(function(){ 	// 获取用户id用于回显用户姓名, 点击编辑名片回显员工姓名 bj9
                    var url = "<%=path%>/account/ajaxFindUserInfoById";
                    $.post(url,{
                        "id" : e.data.userId
                    },function(e){
                        if(e.status == 200){
                            $("#bm_user_id").val(e.data.name);
                        }
                    })
                }) --%>
              
                if("${param.type}" != "copy"){
	                $("#bm_user_id").val(e.data.username);   // 如果是复制按钮跳转过来，则不保留【选择员工】中的值
                	businessCardInfoId = e.data.id;     // business_card_info表主键 | 全局变量 | 20180520 - Yangcl
                }
            	
            	save_tag = true;
                // Who is the fucking bitch , write the fucking code? goumen?? gouye?? goutui?????
                goumen = e.data.showInterprise;    // 企业信息是否显示：1显示0不显示
                gouye = e.data.showBusiness; // 业务信息是否显示：1显示0不显示
                goutui = e.data.showRecommend;   // 推荐信息是否显示：1显示0不显示
                if(goumen == "0"){
                    var qugou = $('#bm_men_dian img').attr('src','<%=path%>/images/marketing/s_check_no.png');
                }
                if(gouye == "0"){
                    var qugouye = $('#bm_ye_wu_gou img').attr('src','<%=path%>/images/marketing/s_check_no.png');
                    $("#info2").hide();
                }
                if(goutui == "0"){
                    var qugoutui = $('#bm_tui_tui img').attr('src','<%=path%>/images/marketing/s_check_no.png');
                    $("#info3").hide();
                }
                if(goumen == "1"){
                    drawStoreInfo(e.data.mdStore);
                    $('#info11').show();
                    $('#info1').show();
                }else{
                    $('#info11').hide();
                    $('#info1').hide();
                }
                cardHtml(e.data);
                cardyHtml(e.data);
                companyName = e.data.companyName;
                mpname = e.data.name;
                job= e.data.job;
                mobile= e.data.mobile;
                drawCompanyInfo();
                yewuList(cardId);
                dialogRole(e.data);
				
                var activityIdList = $(".activity-id");
                for(var i = 0 ; i < activityIdList.length ; i ++){
                	oldActivityIds += $(activityIdList[i]).attr("aid") + ",";
                }
            }
        });
    }
    
    // 业务列表和我推荐的弹窗，员工是否可以操作 - Yangcl 
    function dialogRole(e){
    	var businessTag =  e.businessTag;   // 业务状态1 代表员工有有权限可以更改   2 代表员工没有权限不可更改
    	var activityTag = e.activityTag; 		// 名片绑定的活动是否允许员工设置（0不允许 1允许）
        if(businessTag == 2){
            $("#bm_xuanzeyewu").removeClass("bm_yewu"); 
            $(".deleteye").children("img").remove(); 
        }

        if(activityTag == 0){
        	$("#bm_wotuijianid").removeClass("bm_wotuijian"); 
            $(".deletehuo").children("img").remove(); 
        }
    }
    
    //  获取活动门店信息（查询该活动门店的地址和电话）   
    function drawStoreInfo(storeId_){
        if(ttt == "edit"){
            $("#bm_user_id").prop("disabled",true); 
        } 
        // 编辑和复制都会进入此方法 - 20180520 - Yangcl
        var url = "<%=path%>/store/ajaxQueryStore";
        $.post(url,{ 
            "id" : storeId_  
        },function(e){
        	if(e.status == "200"){
        		$('#micro_address').html('<img src="<%=path%>/images/marketing/icon_address.png" />' + ' '+ e.data.address + '</li>');
                $('#micro_phone').html('<img src="<%=path%>/images/marketing/icon_phone.png" />' + ' ' + e.data.phone + '</li>');
                var html = '<li id="store-id" class="delete_md_detail" storeZid="' + e.data.id + '" >' + e.data.name + '<img src="<%=path%>/images/marketing/close.png" class="x_lista"></li>';
          		$('#bm_md_list').html(html);
        	}
            
        });
    }

    // 获取公司信息（页面中我的名片下面的信息） 
    function drawCompanyInfo(){
        var url = "<%=path%>/company/ajaxCompanyInfo";
        $.post(url,{
           /*  "access_token" : access_token, */
            "id" : cid,
            /* "uid" : uid,
            "card_id" : cardId, */
        },function(e){
            if(e.status == "200"){

                //替换门店照片micro_pic  organization_img
                $("#micro_pic").attr("src",e.data.logo);
                //替换门店名称
                $("#micro_name").text(e.data.name);
                //修复门店名称在灰框中显示与数据不匹配的bug
                //$('#bm_md_list').html(html);
                var keyWord1 = e.data.business.split(/[,，]/);
                var keyWord2 = '';
                for(var i in keyWord1){
                    keyWord2 += keyWord1[i] + " &nbsp&nbsp&nbsp&nbsp ";
                }
                $('#micro_business').html(keyWord2);
                $('#micro_intro').html(e.data.intro);
            }else{
                //showDialog(data.message);
            }
        });
    }
    
    var ttt = "${param.type}";
    if(ttt == "edit"){
        $("#bm_user_id").prop("disabled",true);
    }
    



    //保存用戶选择的门店
    function addStore(){
        var storeIds=store_ids.join(",");
        var url = "<%=path%>/api/card_store/insert";
        $.post(url,{
            "access_token" : access_token,
            "cid" : cid,
            "uid" : uid,
            "card_id" : cardId,
            "store_ids" : storeIds,
        },function(data){
        });
    }
    var flag=false;
    function uploadPic() {
        $("#upload_pic").submit(function (event) {
            if(flag){
                return ;
            }
            flag=true;
            $("#upload_pic").ajaxSubmit({
                type: "post",
                url: "${pageContext.request.contextPath}/api/uploadfile/file",
                data:{"typename":"filepath"},
                success: function (data1) {
                    head_pic=data1.realSavePath;
                    if(StringEmpty(head_pic)){
                        var tutu = $('#card_image').attr('src',data1.realSavePath);
                        var pian = $('#head_pic').attr('src',data1.realSavePath);
                    }

                },
                error: function (msg) {
                    promptDialog("文件上传失败");
                }
            });
            return false;
        });
        flag=false;
        $("#upload_pic").submit();
    }

    //判断字符串是否为空
    function StringEmpty(content) {
        if (content == undefined || content == "" || content == null) {
            return false;
        } else {
            return true;
        }
    }
    //判断是否为手机号码
    function telPhone(cphone){
        var reg =/^1(3|4|5|7|8)\d{9}$/;//正则表达式
        var result = reg.test(cphone);	//匹配
        if(!result){
            return false;
        }else{
            return true;
        }
    }
    //判断邮箱
    function memail(eemail){
        var regEmail = /^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/;
        var result = regEmail.test(eemail);
        if(!result){
            return false;
        }else{
            return true;
        }
    }
    //判断座机
    function zuoj(zuojii){
        var regZuoj = /^(\d{2,4}-?)?\d{7,8}$/;
        var result = regZuoj.test(zuojii);
        if(!result){
            return false;
        }else{
            return true;
        }
    }
    //判断qq
    function mqq(tqq){
        var  regqq= /^\d{5,10}$/;
        var result = regqq.test(tqq);
        if(!result){
            return false;
        }else{
            return true;
        }
    }
    //  js获取url中的参数的方法
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null)
            return unescape(r[2]);
        return null;
    }


    function showDialog(title){
        $('#dialog_title').html('<img src="<%=path%>/images/marketing/s_tick.png"/>'+title+'');
        $('.s_popup_delect2,.s_consum').show().delay(2000).fadeOut();
    }


    var startIndex = 0;
    var pageSize = 5;
    var currentPage = 1;
    var pageCount = 0;
    var listIndex = 0;
    var activityJsonArr = [];	//活动jsonArray

    var status="";
 	// 页面不再传递Session信息，如：access_token、cid、uid - 2018-05-18 - Yangcl
    var access_token = $.cookie('access_token');
    var cid=$.cookie('cid');      
    var uid=$.cookie('uid');
    var aid;

    //推荐活动
    var sysIds;
    //业务活动
    var definedIds;

    var type;


    //点击url时，新建一个页面（推荐）
    $(document).on("click",".bm_huotui",function(){
        var urlt=$(this).attr("turl");
        window.open(urlt);

    });
    var tuijainActivity;
    var yewuActivity;


    //点击url时，新建一个页面（业务）
    $(document).on('click','.bm_huoye',function(){
        var urly = $(this).attr("yurl");
        window.open(urly);
    });



    $(".m_xpages select").change(function(){
        pageSize = Number($(this).val());
        if(listIndex == 1){
            bmstore();
        }else if(listIndex == 2){
            //activitymu();
            func_showActivityDetailDialog()
        }else if(listIndex == 3){
            activityList();
        }else if(listIndex == 4){
            userlist();
        }

    });

    $(".m_xpages a.prev").click(function(){
        $('.next').html('<font color="black">下一页</font>');
        if(currentPage > 1){
            currentPage--;
            startIndex -= pageSize;
            if(currentPage == 1){
                $('.prev').html('<font color="#E0E0E0">上一页</font>');
            }

            if(listIndex == 1){
                bmstore();
            }else if(listIndex == 2){
                //activitymu();
                func_showActivityDetailDialog()
            }else if(listIndex == 3){
                activityList();
            }else if(listIndex == 4){
                userlist();
            }
        }

    });

    $(".m_xpages a.next").click(function(){
        $('.prev').html('<font color="black">上一页</font>');
        if(currentPage < pageCount){
            currentPage++;
            startIndex += pageSize;
            if(currentPage == pageCount){
                $('.next').html('<font color="#E0E0E0">下一页</font>');
            }
            if(listIndex == 1){
                bmstore();
            }else if(listIndex == 2){
                //activitymu();
                func_showActivityDetailDialog()
            }else if(listIndex == 3){
                activityList();
            }else if(listIndex == 4){
                userlist();
            }
        }
    });

    $(".m_xpages :text").keyup(function(e){
        if(e.keyCode==13){
            var pageGo = $(this).val();
            if(/^[0-9]+$/.test(pageGo)){
                pageGo = Number(pageGo);
                if(pageGo<1 || pageGo>pageCount){
                    showDialog('请输入合法页数');
                }else if(pageGo != currentPage){
                    startIndex = (pageGo -1) * pageSize ;
                    if(listIndex == 1){
                        bmstore();
                    }else if(listIndex == 2){
                        //activitymu();
                        func_showActivityDetailDialog()
                    }else if(listIndex == 3){
                        activityList();
                    }else if(listIndex == 4){
                        userlist();
                    }

                }
            }else{
                showDialog('请输入合法页数');
            }
        }
    });
    function page(totalCount) {
        pageCount = totalCount / pageSize;
        if (totalCount % pageSize > 0)
            pageCount++;
        pageCount = parseInt(pageCount);
        currentPage = startIndex / pageSize + 1;
        currentPage = parseInt(currentPage);

        var isPageDisable = "";
        if (currentPage == 1) {
            isPageDisable = "pageDisable";
        } else {
            isPageDisable = "";
        }
        var prev = '<a href="javascript:;" class="prev '+isPageDisable+'">上一页</a>';
        $(".prev").addClass(isPageDisable);

        if (currentPage == pageCount) {
            isPageDisable = "pageDisable";
        } else {
            isPageDisable = "";
        }
        var next = '<a href="javascript:;" class="next '+isPageDisable+'">下一页</a>';
        $(".next").addClass(isPageDisable);
        //$(".m_xpages>.mian>span:eq(1)").text('共' + totalCount + '条');
        //$(".m_xpages>.mian>span:eq(2)").text(currentPage + '/' + pageCount + '页');

        $(".bm_tiao").text('共' + (totalCount>0? totalCount : 0) + '条');
        var zongye =  (currentPage + '/' + pageCount);
        $(".bm_ye").text(zongye + '页');
    }

    //打叉隐藏
    $(document).on('click','#bm_ca1',function(){
        $('.J_xcontact , .J_xactivity').hide();
    });


    //点击取消隐藏
    $('.white').click(function(){
        $('.m_xpopups').hide();
        $('.m_xpropell').hide();
        $('.J_xcontact , .J_xactivity').removeClass('show');
    });

    //添加删除class  w1
    $(function(){
        $(document).on("click",".J_xactivity .m_xswung ul>li",function(){
            var bj = $("#qufen").attr('zdyClass');
            if(bj == "yewu"){
                $(this).addClass("on");
                $(this).find("span").addClass("me");
                var json = {'huoid':$(this).find("span").attr("huoid"),'yname':$(this).find("span").attr("yname"),
                    'cheadpic':$(this).find("span").attr("cheadpic"),'ccent':$(this).find("span").attr("ccent"),
                    'webu':$(this).find("span").attr("webu"),'tuid':$(this).find("span").attr("tuid"),
                    'tuiname':$(this).find("span").attr("tuiname"),'tuiwebu':$(this).find("span").attr("tuiwebu"),
                    'tuipic':$(this).find("span").attr("tuipic"),'tend_t':$(this).find("span").attr("tend_t"),
                    'canren':$(this).find("span").attr("canren"),'browseren':$(this).find("span").attr("browseren")};
                var toAddId = json.huoid;
                var activityJsonString="" ;
                for(var i in yewuActivity){
                    activityJsonString += yewuActivity[i].id+",";

                }
                var idArray = activityJsonString.split(",");
                if($.inArray(toAddId,idArray)<0 && idArray.length<=5){
                    yewuActivity.push(json);
                    //console.debug("打印添加后的业务数组")
                    //console.debug(yewuActivity)
                    activityhtml2();
                }else {
                    $(this).removeClass("on");
                    $(this).find("span").removeClass("me");
                    /*for (var i = 0; i < yewuActivity.length; i++) {
                        var json = yewuActivity[i];
                        if($(this).attr("ccid") == json.ccid){
                            yewuActivity.splice(i,1);
                            break;
                        }
                    }*/
                    function removeByValue(arr, val) {
                        for(var i=0; i<arr.length; i++) {
                            if(arr[i] == val) {
                                arr.splice(i, 1);
                                break;
                            }
                        }
                    }
                    for(var i in yewuActivity){
                        if(yewuActivity[i].id == toAddId){
                            removeByValue(yewuActivity,yewuActivity[i]);
                        }
                    }
                    var lineid = '#yeshan' + toAddId;
                    var shanchu = '#yechu' +toAddId;
                    $(lineid).remove();
                    $(shanchu).remove();
                    //console.debug("业务");
                    //console.debug(yewuActivity);

                }

            }else if(bj == "tuijian"){
                //console.debug(activityJsonArr);
                $(this).addClass("on");
                $(this).find("span").addClass("me");
                var json = {'tuid':$(this).find("span").attr("tuid"),'yname':$(this).find("span").attr("yname"),
                    'cheadpic':$(this).find("span").attr("cheadpic"),'ccent':$(this).find("span").attr("ccent"),
                    'webu':$(this).find("span").attr("webu"),'tuid':$(this).find("span").attr("tuid"),
                    'tuiname':$(this).find("span").attr("tuiname"),'tuiwebu':$(this).find("span").attr("tuiwebu"),
                    'tuipic':$(this).find("span").attr("tuipic"),'tend_t':$(this).find("span").attr("tend_t"),
                    'canren':$(this).find("span").attr("canren"),'browseren':$(this).find("span").attr("browseren")};
                var toAddId = json.tuid;
                var activityJsonString="" ;
                for(var i in tuijainActivity){
                    activityJsonString += tuijainActivity[i].id+",";
                }
                var idArray = activityJsonString.split(",");
                if($.inArray(toAddId,idArray)<0 && idArray.length<=5){
                    tuijainActivity.push(json);
                    //console.debug("打印添加后的推荐数组")
                    //console.debug(tuijainActivity);
                    activityhtml();
                }else{
                    $(this).removeClass("on");
                    $(this).find("span").removeClass("me");
                    function removeByValue(arr, val) {
                        for(var i=0; i<arr.length; i++) {
                            if(arr[i] == val) {
                                arr.splice(i, 1);
                                break;
                            }
                        }
                    }
                    for(var i in tuijainActivity){
                        if(tuijainActivity[i].id == toAddId){
                            removeByValue(tuijainActivity,tuijainActivity[i]);
                        }
                    }
                    var lineid = '#shan' + toAddId;
                    var shanchu = '#chu' +toAddId;
                    $(lineid).remove();
                    $(shanchu).remove();
                    //console.debug("推荐");
                    //console.debug(tuijainActivity);
                }
            }
        });
    });


    //我推荐列表点击叉移除  w2
    $(document).on('click','.deletehuo img',function(){
        //删除数组内容方法
        function removeByValue(arr, val) {
            for(var i=0; i<arr.length; i++) {
                if(arr[i] == val) {
                    arr.splice(i, 1);
                    break;
                }
            }
        }
        var tuid = $(this).attr("tid");
        var lineid = '#shan' + tuid;
        var shanchu = '#chu' +tuid;
        for(var i in list3){
            if(list3[i].id == tuid){
                removeByValue(list3,list3[i]);
            }
        }
        $(lineid).remove();
        $(shanchu).remove();
        //tuijainActivity.splice($.inArray(tuid,tuijainActivity),1);
        tuijianjieshao(list3);
    });
    //业务里外表点击叉移除
    $(document).on('click','.deleteye img',function(){
        //删除数组内容方法
        function removeByValue(arr, val) {
            for(var i=0; i<arr.length; i++) {
                if(arr[i] == val) {
                    arr.splice(i, 1);
                    break;
                }
            }
        }
        var syuid = $(this).attr("yid");
        var lineid = '#yeshan' + syuid;
        var shanchu = '#yechu' +syuid;
        for(var i in list2){
            if(list2[i].id == syuid){
                removeByValue(list2,list2[i]);
            }
        }
        $(lineid).remove();
        $(shanchu).remove();
        yewujieshao(list2)

    });

    function childFinish(){
        $('.m_xpopups').hide();
        $('.m_xpropell').hide();
        $('.J_xcontact , .J_xactivity').removeClass('show');
    }

    //保存业务活动
    function saveYeActivity(cardId){
        var url = "<%=path%>/businessCard/ajaxInsertCardActivity";
        $.post(url,{ 
            "cardId" : cardId,
            "ids" : definedIds,
            "type" : 1
        },function(e){
            if(e.status == 200){
                save_tag=true;
            }
        });
    }


    //保存推荐活动
    function saveTuiActivity(cardId){
        var url = "<%=path%>/businessCard/ajaxInsertCardActivity";
        $.post(url,{ 
            "cardId" : cardId,
            "ids" : sysIds,
            "type" : 2
        },function(e){

            if(e.status == 200){
                save_tag=true;

                if(save_xia==true){
                    window.location.href = "<%=path%>/view/ui/cardPreview?card_id="+cardId;
                }else{
                    addStore();
                }
            }
        });
    }
    $.ajaxSetup({
        async : false
    });

    var yeuTag=false;
    var tuiTag=false;
    //点击重新编辑修改选择的业务
    function yeupdateActivity(cardId) {
        var style = $("[name='yewu']").attr("style");
        if(style != "display:none"){
        	var flag = 0;        
        	var newActivityIds = "";
        	var activityIdList = $(".activity-id");
            for(var i = 0 ; i < activityIdList.length ; i ++){
            	newActivityIds += $(activityIdList[i]).attr("aid") + ",";  
            }
            if(newActivityIds != "" && newActivityIds == oldActivityIds){
            	flag = 0;  // 无变化，不需要更新
            }
            if(newActivityIds != "" && oldActivityIds == ""){
            	flag = 1;   // 以前没有业务列表，此次只添加
            }
            if(oldActivityIds != "" && newActivityIds !=oldActivityIds){
            	flag = 2;      // 先全部删除，再全部添加。
            }
            if(flag == 0){
            	return ;
            }
            
            var ids = "";
        	var list = $(".deleteye");
            for(var i = 0 ; i < list.length ; i ++){
            	ids += $(list[i]).attr("aid") + ",";  
            }
       		yeuTag = false;
            var url = "<%=path%>/businessCard/ajaxUpdateCardActivity";
            $.post(url, {
                  /*  "access_token": access_token,
                   "cid": cid,
                   "uid": uid, */
                   "cardId": cardId,
                   "ids": ids ,  
                   "type": 1 ,
                   "msg" : "yeupdateActivity type=1",                 
                   "flag" : flag
                   //"business_tag" : 1
               }, function (data) {
                   if (data.status == 200) {
                       save_tag = true;
                       if (save_xia == true) {
                           yeuTag = true;
                           intentPreview();
                       } else {
                       }
                   }
               });
        }
    }
    //点击重新编辑修改推荐活动
    function tuiupdateActivity(cardId){
        var style = $("[name='tuijian']").attr("style");
        if(style != "display:none"){
        	var flag = 0;        
        	var newActivityIds = "";
        	var activityIdList = $(".activity-id");
            for(var i = 0 ; i < activityIdList.length ; i ++){
            	newActivityIds += $(activityIdList[i]).attr("aid") + ",";  
            }
            if(newActivityIds != "" && newActivityIds == oldActivityIds){
            	flag = 0;  // 无变化，不需要更新
            }
            if(newActivityIds != "" && oldActivityIds == ""){
            	flag = 1;   // 以前没有业务列表，此次只添加
            }
            if(oldActivityIds != "" && newActivityIds !=oldActivityIds){
            	flag = 2;      // 先全部删除，再全部添加。
            }
            if(flag == 0){
            	return ;
            }
            
            var ids = "";
        	var list = $(".deletehuo");
            for(var i = 0 ; i < list.length ; i ++){
            	ids += $(list[i]).attr("aid") + ",";  
            }
            tuiTag=false;
            var url = "<%=path%>/businessCard/ajaxUpdateCardActivity";
            $.post(url, {
                /* "access_token": access_token,
                "cid": cid,
                "uid": uid, */
                "cardId": cardId,
                "ids": ids ,
                "type": 2  ,
                "msg" : "yeupdateActivity type=2",   
                "flag" : flag
                //"business_tag" : 1
            }, 
            function(data){
                if(data.status == 200){
                    save_tag=true;
                    if(save_xia==true){
                        tuiTag=true;
                        intentPreview();
                    }else{
                    }
                }
            });
            
            
        }
    }

    function intentPreview(){
        if(tuiTag && yeuTag)
            window.location.href = "<%=path%>/view/ui/cardPreview?card_id="+cardId;
    }

    //从其他页面进入时获取当前名片业务列表  w5
    function yewuList(cardId){
        var url = "<%=path%>/businessCard/ajaxCardActivityList";
        $.post(url,{
            "access_token" : access_token,
            "cid" : cid,
            "uid" :uid,
            "cardId" : cardId,
        },function(data){
            if(data.status == "200"){
                //业务
                yewuActivity = data.activityData;
                list2 = data.activityData;
                //推荐
                tuijainActivity = data.operationData;
                list3 = data.operationData;
                yewujieshao(yewuActivity);
                tuijianjieshao(tuijainActivity);
            }
        });
    }



    var list2;  //业务介绍列表
    var list3;  //我推荐列表

    function showBack(){
        //遍历list1,进行展示
        yewujieshao(list2);
    }

    function showBack3(){
        tuijianjieshao(list3);
    }

</script>
<script>
    function tuijianjieshao(tuijainActivity){
        var htmltui = "";
        var htmljian = "";
        for(var j in tuijainActivity){
            var act_tuijianId = tuijainActivity[j].id;
            var act_tuipic = tuijainActivity[j].headPic;
            var act_names = tuijainActivity[j].name;
            var act_tuiname = tuijainActivity[j].name;
            var act_tuititel = tuijainActivity[j].title;
            var act_tuicontent = tuijainActivity[j].content;
            var act_endt = tuijainActivity[j].end_time;
            var act_count = tuijainActivity[j].join_num;
            var act_web_tuiurl = tuijainActivity[j].webUrl;
            var act_browserenshu = tuijainActivity[j].browse_num;
            var act_share_url = tuijainActivity[j].sharePic;
            if(act_tuicontent != undefined){
                htmltui += '<li id="shan'+act_tuijianId+'" class="deletehuo activity-id" tid="'+act_tuijianId+'" aid="'+act_tuijianId+'">'+act_names+'<img name="tuijian" src="<%=path%>/images/marketing/close.png" class="x_lista" id="shan'+act_tuijianId+'" tid="'+act_tuijianId+'"></li>';

                if(StringEmpty(act_share_url)){
                    htmljian += '<div class="k_content" id="chu'+act_tuijianId+'"><dl class="fix"><dt><img style="width:72px; height:72px;" src="' + act_tuipic + '"/></dt>' ;   // act_share_url
                }else{
                    htmljian += '<div class="k_content" id="chu'+act_tuijianId+'"><dl class="fix"><dt><img style="width:72px; height:72px;" src="' + act_tuipic + '"/></dt>' ;
                }
                /*if(StringEmpty(act_tuipic)){
                    htmljian += '<div class="k_content" id="chu'+act_tuijianId+'"><dl class="fix"><dt><img style="width:72px; height:72px;" src="'+act_share_url+'"/></dt>' ;
                }else{
                    htmljian += '<div class="k_content" id="chu'+act_tuijianId+'"><dl class="fix"><dt><img style="width:72px; height:72px;" src="'+act_tuipic+'"/></dt>' ;
                }*/

                htmljian += '<dd><p>'+act_tuiname+'</p>';
                htmljian += '<p class="s_md">'+act_tuicontent+'</p>';
                htmljian += '<li class="s_like" style="display:none"><img class="s_dianzan_img" src="<%=path%>/images/marketing/dianzan.png" _id="1" />'+act_browserenshu+'</li></div></ol></div>';

            }
        }
        $('#bm_tuijan').html(htmltui);
        $('#bm_xianshi').html(htmljian);
    }
</script>
<script>
    function yewujieshao(yewuActivity){
        var html = "";
        var htmlye = "";

        for(var i in yewuActivity){
            var act_idd = yewuActivity[i].id;
            var act_yename = yewuActivity[i].name;
            var act_yetitel = yewuActivity[i].title;
            var act_head_pic = yewuActivity[i].headPic;
            var act_concent = yewuActivity[i].content;
            var act_web_yeurl = yewuActivity[i].webUrl;
            var act_share_url = yewuActivity[i].sharePic;

            html += '<li id="yeshan'+act_idd+'" class="deleteye activity-id" yid="'+act_idd+'" aid="'+act_idd+'">'+act_yename+'<img name="yewu" src="<%=path%>/images/marketing/close.png" class="x_lista" id="yeshan'+act_idd+'" yid="'+act_idd+'"></li>';

            if(StringEmpty(act_share_url)){
                htmlye += '<div style="background: #fff;border-bottom: 11px solid #F7F7F7;margin-bottom:10px;height: 163px" id="yechu'+act_idd+'"><dl class="fix" style="border-butte: 1px solid #eee;"><div style="border-bottom: 1px solid #eee;height: 105px;"><dt><img style="width:72px; height:72px;" src="' + act_head_pic + '" /></dt>';       // act_share_url
            }else{
                htmlye += '<div style="background: #fff;border-bottom: 11px solid #F7F7F7;margin-bottom:10px;height: 163px" id="yechu'+act_idd+'"><dl class="fix" style="border-top: 1px solid #eee;"><div style="border-bottom: 1px solid #eee;height: 105px;"><dt><img style="width:72px; height:72px;" src="' + act_head_pic + '" /></dt>';
            }
            htmlye += '<dd id="bm_ziding"><p>'+act_yename+'</p>';
            htmlye += '<p class="s_md">'+act_concent+'</p></dd></div></dl></div>';
        }

        $('#bm_yewuxian').html(html);
        $('#bm_yewushow').html(htmlye);
    }
</script>
</body>
</html>